package com.lhd.qd.module.system.user.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lhd.qd.common.base.ApiResult;
import com.lhd.qd.common.base.BaseController;
import com.lhd.qd.module.system.user.model.dto.UserLoginLogPageQuery;
import com.lhd.qd.module.system.user.model.vo.UserLoginLogListVO;
import com.lhd.qd.module.system.user.service.UserLoginLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "用户登录日志")
@RequestMapping("user-login-log")
@RestController
public class UserLoginLogController extends BaseController {

    @Autowired
    private UserLoginLogService userLoginLogService;

    @ApiOperation(value = "分页列表", response = UserLoginLogListVO.class)
    @GetMapping
    public ResponseEntity<ApiResult<IPage<UserLoginLogListVO>>> pageUserLoginLog(UserLoginLogPageQuery query) {

        return success(userLoginLogService.pageUserLoginLog(query));
    }
}
